package a01;
/**
 * @author Sven Eric Panitz
 */
import name.panitz.ludens.util.ShowInFrame;
import java.util.*;

public class PaintablesPanel extends SizedPanel {

	private static final long serialVersionUID = 1L;
	List<Paintable> pas;

	public PaintablesPanel(List<Paintable> pas) {
		this.pas = pas;
	}

	public void paintComponent(java.awt.Graphics g) {
		for (Paintable pa : pas)
			pa.paintTo(g);
	}

	public static void main(String[] args) {
		List<Paintable> ps = new ArrayList<Paintable>();
		ps.add(new PaintableOval(100, 50, 30, 50));
		ps.add(new PaintableOval(100, 50, 130, 150));

		ShowInFrame.show("Ovale", new PaintablesPanel(ps));
	}
}
